package com.example.mall.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 订单退款表
 * </p>
 *
 * @author whale
 * @since 2025-05-09
 */
@TableName("tb_order_refunds")
public class OrderRefunds extends Model<OrderRefunds> {

    private static final long serialVersionUID = 1L;

    /**
     * 退款记录唯一标识
     */
    @TableId("refund_id")
    private Long refundId;
    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 退款状态（0：待退款，1：已退款，2：退款失败）
     */
    @TableField("refund_status")
    private Integer refundStatus;
    /**
     * 退款原因
     */
    @TableField("refund_reason")
    private String refundReason;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public OrderRefunds() {
        this.refundId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getRefundId() {
        return refundId;
    }

    public void setRefundId(Long refundId) {
        this.refundId = refundId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }

    public Integer getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

    public String getRefundReason() {
        return refundReason;
    }

    public void setRefundReason(String refundReason) {
        this.refundReason = refundReason;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "OrderRefunds{" +
        ", refundId=" + refundId +
        ", orderId=" + orderId +
        ", refundAmount=" + refundAmount +
        ", refundStatus=" + refundStatus +
        ", refundReason=" + refundReason +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
